home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
snobol
/
vsnobol
/
triplet.sno
< prev
next >
Wrap
Text File
|
1991-02-14
|
468b
|
20 lines
* TRIPLET.SNO
*
* Sample program from Chapter 5 of the Tutorial
*
* Trim input, count input lines:
&TRIM = 1
N = 0
* Read next input line, all done if End-of-File.
LOOP S = INPUT :F(END)
* Precede with blanks to center within 80 character line:
OUTPUT = DUPL(' ', (80 - SIZE(S)) / 2) S
* Increment count, but reset to 0 every third line.
* Also, output a blank line when count resets:
N = REMDR(N + 1, 3)
OUTPUT = EQ(N, 0) :(LOOP)
END